package com.henu.acmrating.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author XiaolongLi
 * @Description LeetcodeUtils
 * @Date 2020/12/26 21:58
 */
public class LeetcodeUtils {
    // 评测结果
    public static Map<String, String> statusMap = new HashMap<>();

    static {
        statusMap.put("A_10", "Accepted");
        statusMap.put("A_11", "Wrong Answer\n");
        statusMap.put("A_12", "Memory limit exceeded");
        statusMap.put("A_13", "Output limit exceeded");
        statusMap.put("A_14", "Time limit exceeded");
        statusMap.put("A_15", "Runtime error");
        statusMap.put("A_16", "Internal error");
        statusMap.put("A_20", "Compile error");
        statusMap.put("A_30", "Timeout error");
    }

    // 语言
    public static String[] langArray = new String[]{"C++", "JAVA", "Python", "MySQL", "C", "C#", "JavaScript",
            "Ruby", "Bash", "Swift", "Go", "Python3", "Scala", "Kotlin", "MS SQL Server", "Oracle", "HTML",
            "Python ML", "Rust","PHP", "TypeScript",};


    public static String langTo(String lang) {
        return langArray[Integer.parseInt(lang.split("A_")[1])];
    }


    public static String statusTo(String status) {
        return statusMap.get(status);

    }
}
